<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Home - Documentation</title>


    <link rel="icon" href="favicon.ico?v=2">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css">

    <link rel="stylesheet" href="styles/prettify-tomorrow.css">

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,700">
    <link rel="stylesheet" href="styles/jsdoc-default.css">

    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/ionicons/2.0.1/css/ionicons.min.css">
</head>
<body>

<div class="navbar navbar-default navbar-fixed-top">
  <div class="navbar-header">
    <a class="navbar-brand" href="../">
        <img src="img/async-logo.svg" alt="Async.js">
    </a>
  </div>
  <ul class="nav navbar-nav">
    <li id="version-dropdown" class="dropdown">
      <a href="#" class="dropdown-toggle vertically-centered" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">v3.2.0 <span class="caret"></span>
      </a>
      <ul class="dropdown-menu">
        <li><a href="../v3/">v3.0.x</a></li>
        <li><a href="../v2/">v2.6.2</a></li>
        <li>
          <a href="https://github.com/caolan/async/blob/v1.5.2/README.md">v1.5.x</a>
        </li>
      </ul>
    </li>
    <li><a href="./index.html">Home</a></li>
    <li><a href="./docs.html">Docs</a></li>
    <li><a href="https://github.com/caolan/async/blob/master/CHANGELOG.md">Changelog</a></li>
    <li><a href="https://github.com/caolan/async"><i class="ion-social-github" aria-hidden="true"></i></a></li>
  </ul>
  <ul class="nav navbar-nav navbar-right">
    <form class="navbar-form navbar-left" role="search">
      <div class="form-group">
        <input type="text" class="form-control typeahead" id="doc-search" placeholder="Search" autofocus>
      </div>
    </form>
  </ul>
</div>


<input type="checkbox" id="nav-trigger" class="nav-trigger">
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<div id="main">
    <div id="main-container" data-spy="scroll" data-target="#toc" data-offset="50">
        

        



    









    


    <section class="readme">
        <article><p><img src="https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg" alt="Async Logo"></p>
<p><a href="https://travis-ci.org/caolan/async"><img src="https://travis-ci.org/caolan/async.svg?branch=master" alt="Build Status via Travis CI"></a>
<a href="https://www.npmjs.com/package/async"><img src="https://img.shields.io/npm/v/async.svg" alt="NPM version"></a>
<a href="https://coveralls.io/r/caolan/async?branch=master"><img src="https://coveralls.io/repos/caolan/async/badge.svg?branch=master" alt="Coverage Status"></a>
<a href="https://gitter.im/caolan/async?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/caolan/async"></a></p>
<p><em>For Async v1.5.x documentation, go <a href="https://github.com/caolan/async/blob/v1.5.2/README.md">HERE</a></em></p>
<p>Async &#x662F;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684;&#x5F02;&#x6B65; JavaScript &#x6A21;&#x5757;&#x3002;&#x867D;&#x7136;&#x6700;&#x521D;&#x662F;&#x4E3A;&#x4E86;&#x4E0E; <a href="https://nodejs.org/">Node.js</a> &#x4E00;&#x8D77;&#x4F7F;&#x7528;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <code>npm i async</code>&#x5B89;&#x88C5;,
&#x5B83;&#x4E5F;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x4F7F;&#x7528;&#x3002;</p>
<p>Async &#x4E5F;&#x80FD;&#x901A;&#x8FC7; yarn &#x5B89;&#x88C5;:</p>
<ul>
<li><a href="https://yarnpkg.com/en/">yarn</a>: <code>yarn add async</code></li>
</ul>
<p>Async&#x63D0;&#x4F9B;&#x4E86;&#x5927;&#x7EA6;70&#x4E2A;&#x51FD;&#x6570;&#x3002;&#x5176;&#x4E2D;&#x5305;&#x62EC;&#x96C6;&#x5408; (<code>map</code>, <code>reduce</code>, <code>filter</code>, <code>each</code>&#x2026;) &#x7684;&#x5F02;&#x6B65;&#x6269;&#x5C55;&#x3002;&#x4EE5;&#x53CA;&#x5E38;&#x89C1;&#x7684;&#x5F02;&#x6B65;&#x63A7;&#x5236;&#x6D41;&#x6A21;&#x5F0F; (<code>parallel</code>, <code>series</code>, <code>waterfall</code>&#x2026;). &#x8FD9;&#x4E9B;&#x51FD;&#x6570;&#x5047;&#x5B9A;&#x60A8;&#x9075;&#x5FAA;Node.js&#x7EA6;&#x5B9A; (&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;callback&#x4F5C;&#x4E3A;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x53C2;&#x6570;-- &#x4E00;&#x4E2A;&#x671F;&#x671B;&#x9519;&#x8BEF;&#x4F5C;&#x4E3A;&#x5176;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;&#x7684;&#x56DE;&#x8C03;&#x2014;&#x5E76;&#x8C03;&#x7528;&#x56DE;&#x8C03;&#x4E00;&#x6B21;)&#x3002;</p>
<p>&#x4F60;&#x4E5F;&#x53EF;&#x4EE5;&#x7528; <code>async</code> &#x51FD;&#x6570;&#x4EE3;&#x66FF; callback-accepting &#x51FD;&#x6570;&#x63D0;&#x4F9B;&#x7ED9; Async &#x65B9;&#x6CD5;.  &#x66F4;&#x591A;&#x4FE1;&#x606F;,&#x8BF7;&#x53C2;&#x8003; <a href="global.html#AsyncFunction">AsyncFunction</a></p>
<h2>Quick Examples</h2>
<pre class="prettyprint source lang-js"><code>async.map([&apos;file1&apos;,&apos;file2&apos;,&apos;file3&apos;], fs.stat, function(err, results) {
    // results is now an array of stats for each file
});

async.filter([&apos;file1&apos;,&apos;file2&apos;,&apos;file3&apos;], function(filePath, callback) {
  fs.access(filePath, function(err) {
    callback(null, !err)
  });
}, function(err, results) {
    // results now equals an array of the existing files
});

async.parallel([
    function(callback) { ... },
    function(callback) { ... }
], function(err, results) {
    // optional callback
});

async.series([
    function(callback) { ... },
    function(callback) { ... }
]);
</code></pre>
<p>&#x8FD8;&#x6709;&#x66F4;&#x591A;&#x7684;&#x529F;&#x80FD;&#x54E6;,&#x8BF7;&#x67E5;&#x770B;&#x540E;&#x9762;&#x5B8C;&#x6574;&#x529F;&#x80FD;&#x5217;&#x8868;&#x3002;&#x5982;&#x679C;&#x60A8;&#x89C9;&#x5F97;&#x8FD8;&#x7F3A;&#x4E86;&#x70B9;&#x4EC0;&#x4E48;&#xFF0C;&#x8BF7;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;GitHub issue &#x7ED9;&#x6211;&#x4EEC;&#x3002;</p>
<h2>&#x5E38;&#x89C1;&#x95EE;&#x9898; <a href="http://stackoverflow.com/questions/tagged/async.js">(StackOverflow)</a></h2>
<h3>&#x540C;&#x6B65;&#x8FED;&#x4EE3;&#x51FD;&#x6570; (Synchronous iteration functions)</h3>
<p>&#x5728;&#x4F7F;&#x7528;async&#x7684;&#x65F6;&#x5019;,&#x5982;&#x679C;&#x4F60;&#x9047;&#x5230;&#x7C7B;&#x4F3C; <code>RangeError: Maximum call stack size exceeded.</code>&#x7684;&#x62A5;&#x9519;&#x6216;&#x8005;&#x5176;&#x4ED6;&#x6808;&#x6EA2;&#x51FA;&#x95EE;&#x9898; , &#x4F60;&#x53EF;&#x80FD;&#x4F7F;&#x7528;&#x4E86;&#x540C;&#x6B65;&#x8FED;&#x4EE3;&#x3002;&#x4F7F;&#x7528;&#x201C;&#x540C;&#x6B65;&#x201D;&#xFF0C;&#x610F;&#x5473;&#x7740;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x4E0E;&#x5B83;&#x7684;callback&#x5728;&#x540C;&#x4E00;&#x4E2A;&#x4E8B;&#x4EF6;&#x5FAA;&#x73AF;(javascript event loop)&#x4E2D;&#x6267;&#x884C;&#xFF0C;&#x4F7F;&#x7528; I/O &#x6216;&#x8005; &#x5B9A;&#x65F6;&#x5668; &#x9664;&#x5916;&#x3002;&#x8C03;&#x7528;&#x592A;&#x591A;&#x7684;callback&#x4F1A;&#x4F7F;&#x6808;&#x6EA2;&#x51FA;&#x3002;&#x5982;&#x679C;&#x4F60;&#x9047;&#x5230;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x901A;&#x8FC7;<code>async.setImmediate</code>&#x65B9;&#x6CD5;&#x542F;&#x52A8;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x8C03;&#x7528;&#x6808;&#x5728;&#x4E0B;&#x4E00;&#x6B21;&#x4E8B;&#x4EF6;&#x5FAA;&#x73AF;&#x4E2D;&#x8FD0;&#x884C;&#x3002;</p>
<p>&#x5982;&#x679C;&#x5728;&#x67D0;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;&#x63D0;&#x65E9;&#x56DE;&#x8C03;&#xFF0C;&#x8FD9;&#x4E5F;&#x5076;&#x7136;&#x4F1A;&#x4EA7;&#x751F;&#xFF1A;</p>
<pre class="prettyprint source lang-js"><code>async.eachSeries(hugeArray, function iteratee(item, callback) {
    if (inCache(item)) {
        callback(null, cache[item]); // &#x5982;&#x679C;&#x592A;&#x591A;&#x7684;&#x9879;&#x76EE;&#x88AB;&#x7F13;&#x5B58;&#xFF0C;&#x4E5F;&#x4F1A;&#x6808;&#x6EA2;&#x51FA;
    } else {
        doSomeIO(item, callback);
    }
}, function done() {
    //...
});
</code></pre>
<p>&#x8BE5;&#x6210;&#x8FD9;&#x6837;:</p>
<pre class="prettyprint source lang-js"><code>async.eachSeries(hugeArray, function iteratee(item, callback) {
    if (inCache(item)) {
        async.setImmediate(function() {
            callback(null, cache[item]);
        });
    } else {
        doSomeIO(item, callback);
        //...
    }
});
</code></pre>
<p>&#x51FA;&#x4E8E;&#x6027;&#x80FD;&#x8003;&#x8651;&#xFF0C;Async&#x6CA1;&#x6709;&#x505A;&#x540C;&#x6B65;&#x8FED;&#x4EE3;&#x5668;&#x6821;&#x9A8C;&#x3002;&#x5982;&#x679C;&#x4ECD;&#x7136;&#x9047;&#x5230;&#x5806;&#x6808;&#x6EA2;&#x51FA;,&#x53EF;&#x4EE5;&#x6309;&#x7167;&#x4E0A;&#x9762;&#x7684;&#x65B9;&#x6CD5;&#x8FDB;&#x884C;&#x5EF6;&#x8FDF;&#x3002;&#x6216;&#x8005;&#x4F7F;&#x7528;<a href="#ensureAsync"><code>async.ensureAsync</code></a>&#x65B9;&#x6CD5;&#x5305;&#x88C5;&#x51FD;&#x6570;&#xFF0C;&#x8FD9;&#x4E9B;&#x51FD;&#x6570;&#x672C;&#x8D28;&#x4E0A;&#x662F;&#x5F02;&#x6B65;&#x7684;&#xFF0C;&#x56E0;&#x6B64;&#x4E0D;&#x5B58;&#x5728;&#x6B64;&#x95EE;&#x9898;&#xFF0C;&#x4E5F;&#x4E0D;&#x9700;&#x8981;&#x989D;&#x5916;&#x7684;&#x56DE;&#x8C03;&#x5EF6;&#x8FDF;&#x3002;</p>
<p>&#x5982;&#x679C;JavaScript&#x7684;&#x4E8B;&#x4EF6;&#x5FAA;&#x73AF;&#x4ECD;&#x7136;&#x6709;&#x70B9;&#x6A21;&#x7CCA;&#xFF0C;&#x8BF7;&#x67E5;&#x770B;<a href="http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/">this article</a> or <a href="http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html">this talk</a> &#x83B7;&#x53D6;&#x66F4;&#x591A;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x3002;</p>
<h3>&#x591A;&#x6B21;&#x8C03;&#x7528;&#x56DE;&#x8C03;&#x51FD;&#x6570;( Multiple callbacks)</h3>
<p>&#x786E;&#x4FDD;&#x5728;&#x8C03;&#x7528;callback&#x540E;<code>return</code>&#x8FD9;&#x4E2A;&#x51FD;&#x6570;,&#x5426;&#x5219;&#x5728;&#x8BB8;&#x591A;&#x60C5;&#x51B5;&#x4E0B;&#x4F1A;&#x5BFC;&#x81F4;&#x591A;&#x6B21;&#x56DE;&#x8C03;&#x548C;&#x4E0D;&#x53EF;&#x9884;&#x77E5;&#x7684;&#x884C;&#x4E3A;&#x3002;</p>
<pre class="prettyprint source lang-js"><code>async.waterfall([
    function(callback) {
        getSomething(options, function (err, result) {
            if (err) {
                callback(new Error(&quot;failed getting something:&quot; + err.message));
                // we should return here
            }
            // since we did not return, this callback still will be called and
            // `processData` will be called twice
            callback(null, result);
        });
    },
    processData
], done)
</code></pre>
<p>&#x6BCF;&#x5F53;&#x56DE;&#x8C03;&#x8C03;&#x7528;&#x4E0D;&#x662F;&#x51FD;&#x6570;&#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x8BED;&#x53E5;&#x65F6;&#xFF0C;&#x6700;&#x597D;&#x4F7F;&#x7528; <code>return callback(err, result)</code>&#x3002;</p>
<h3>Using ES2017 <code>async</code> functions</h3>
<p>Async &#x53EF;&#x4EE5;&#x7528; <code>async</code> functions &#x4EE3;&#x66FF; Node-&#x98CE;&#x683C; &#x56DE;&#x8C03;&#x51FD;&#x6570;&#x3002;&#x6CA1;&#x6709;callback&#x5F62;&#x53C2;,&#x901A;&#x8FC7;<code>return</code> &#x66FF;&#x4EE3;<code>callback(null,result)</code>&#x3002;&#x901A;&#x8FC7;&#x629B;&#x5F02;&#x5E38;<code>throw new Error()</code>&#x4EE3;&#x66FF; <code>callback(err)</code>&#x3002;</p>
<pre class="prettyprint source lang-js"><code>async.mapLimit(files, 10, async file =&gt; { // &lt;- no callback!
    const text = await util.promisify(fs.readFile)(dir + file, &apos;utf8&apos;)
    const body = JSON.parse(text) // &lt;- a parse error here will be caught automatically
    if (!(await checkValidity(body))) {
        throw new Error(`${file} has invalid contents`) // &lt;- this error will also be caught
    }
    return body // &lt;- return a value!
}, (err, contents) =&gt; {
    if (err) throw err
    console.log(contents)
})
</code></pre>
<p>&#x6211;&#x4EEC;&#x53EA;&#x80FD;&#x8BC6;&#x522B;&#x5230;&#x539F;&#x751F;<code>async</code> functions&#xFF0C;&#x4E0D;&#x5305;&#x62EC;&#x88AB;&#x8F6C;&#x79FB;&#x7684;&#x7248;&#x672C;(e.g. with Babel)&#x3002;&#x53E6;&#x5916;&#x60A8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>async.asyncify()</code>&#x628A;<code>async</code> functions &#x5305;&#x88C5;&#x6210; node-style callback</p>
<h3>&#x7ED1;&#x5B9A;&#x4E0A;&#x4E0B;&#x6587; Binding a context to an iteratee</h3>
<p>&#x4F20;&#x9012;&#x7ED9;Async&#x7684;&#x5F02;&#x6B65;&#x51FD;&#x6570;,this&#x7684;&#x4E0A;&#x4E0B;&#x6587;&#x6307;&#x5411;&#x4F1A;&#x88AB;&#x6539;&#x53D8;,&#x9700;&#x8981;&#x901A;&#x8FC7;<code>bind</code>&#x65B9;&#x6CD5;&#x6307;&#x5B9A;&#x4E0A;&#x4E0B;&#x6587;</p>
<pre class="prettyprint source lang-js"><code>// Here is a simple object with an (unnecessarily roundabout) squaring method
var AsyncSquaringLibrary = {
    squareExponent: 2,
    square: function(number, callback){
        var result = Math.pow(number, this.squareExponent);
        setTimeout(function(){
            callback(null, result);
        }, 200);
    }
};

async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result) {
    // result is [NaN, NaN, NaN]
    // This fails because the `this.squareExponent` expression in the square
    // function is not evaluated in the context of AsyncSquaringLibrary, and is
    // therefore undefined.
});

async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result) {
    // result is [1, 4, 9]
    // With the help of bind we can attach a context to the iteratee before
    // passing it to Async. Now the square function will be executed in its
    // &apos;home&apos; AsyncSquaringLibrary context and the value of `this.squareExponent`
    // will be as expected.
});
</code></pre>
<h3>&#x5185;&#x5B58;&#x6CC4;&#x6F0F; Subtle Memory Leaks</h3>
<p>&#x5728;&#x67D0;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x5F53;&#x60A8;&#x5728;&#x53E6;&#x4E00;&#x4E2A;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x4E2D;&#x8C03;&#x7528;Async&#x65B9;&#x6CD5;&#x65F6;&#xFF0C;&#x60A8;&#x53EF;&#x80FD;&#x60F3;&#x5C3D;&#x65E9;&#x9000;&#x51FA;&#x5F02;&#x6B65;&#x6D41;&#xFF1A;</p>
<pre class="prettyprint source lang-javascript"><code>function myFunction (args, outerCallback) {
    async.waterfall([
        //...
        function (arg, next) {
            if (someImportantCondition()) {
                return outerCallback(null)
            }
        },
        function (arg, next) {/*...*/}
    ], function done (err) {
        //...
    })
}
</code></pre>
<p>&#x6709;&#x65F6;&#x5019;&#x4F60;&#x60F3;&#x8DF3;&#x8FC7;&#x7011;&#x5E03;&#x6D41;&#x7684;&#x5269;&#x4F59;&#x8FC7;&#x7A0B;,&#x4F60;&#x8C03;&#x7528;&#x4E86;&#x5916;&#x90E8;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;,&#x4F46;&#x662F;Async&#x8FD8;&#x662F;&#x4F1A;&#x7B49;&#x5F85;&#x5185;&#x90E8;&#x7684;<code>next</code>&#x51FD;&#x6570;&#x88AB;&#x8C03;&#x7528;,&#x4ECE;&#x800C;&#x9020;&#x6210;&#x51FD;&#x6570;&#x6CA1;&#x6709;&#x6B63;&#x786E;&#x7ED3;&#x675F;&#x3002;</p>
<p>&#x4ECE; 3.0&#x7248;&#x672C;, &#x4F60;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x4EFB;&#x4F55; <code>false</code> &#x4F5C;&#x4E3A; <code>error</code> &#x53C2;&#x6570;&#x7684;Async &#x56DE;&#x8C03;,&#x8BA9;Async&#x7ED3;&#x675F;&#x65B9;&#x6CD5;&#x3002;</p>
<pre class="prettyprint source lang-javascript"><code>        function (arg, next) {
            if (someImportantCondition()) {
                outerCallback(null)
                return next(false) // &#x2190; signal that you called an outer callback
            }
        },
</code></pre>
<h3>&#x5904;&#x7406;&#x96C6;&#x5408;&#x65F6;&#x5BF9;&#x96C6;&#x5408;&#x8FDB;&#x884C;&#x6539;&#x53D8; Mutating collections while processing them</h3>
<p>&#x5982;&#x679C;&#x4F60;&#x901A;&#x8FC7;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#x53BB;&#x8C03;&#x7528;Async&#x7684;&#x96C6;&#x5408;&#x65B9;&#x6CD5;(&#x4F8B;&#x5982; <code>each</code>, <code>mapLimit</code>, or <code>filterSeries</code>),
&#x7136;&#x540E;&#x6570;&#x7EC4;&#x88AB;<code>push</code>, <code>pop</code>, or <code>splice</code> &#x8FD9;&#x4E9B;&#x65B9;&#x6CD5;&#x4FEE;&#x6539;,&#x8FD9;&#x53EF;&#x80FD;&#x4F1A;&#x5BFC;&#x81F4;&#x610F;&#x5916;,&#x6216;&#x8005;&#x4E0D;&#x786E;&#x5B9A;&#x7684;&#x884C;&#x4E3A;&#x3002;Async&#x4F1A;&#x8FED;&#x4EE3;&#x5230;&#x6EE1;&#x8DB3;&#x6570;&#x7EC4;&#x7684;&#x539F;&#x59CB; <code>length</code>&#x6B21;&#x6570;&#x3002;&#x4E00;&#x4E9B; <code>push</code>, <code>pop</code>, or <code>splice</code> &#x7684;&#x7D22;&#x5F15;&#x5DF2;&#x7ECF;&#x88AB;&#x5904;&#x7406;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x4E0D;&#x5EFA;&#x8BAE;&#x5728;&#x5F02;&#x6B65;&#x5F00;&#x59CB;&#x5BF9;&#x5176;&#x8FDB;&#x884C;&#x8FED;&#x4EE3;&#x4E4B;&#x540E;&#x4FEE;&#x6539;&#x8BE5;&#x6570;&#x7EC4;&#x3002; &#x5982;&#x679C;&#x786E;&#x5B9E;&#x9700;&#x8981;<code>push</code>, <code>pop</code>, or <code>splice</code>&#xFF0C;&#x8BF7;&#x6539;&#x7528; <code>queue</code>&#x3002;</p>
<h2>&#x4E0B;&#x8F7D;</h2>
<p>&#x4ECE;
<a href="https://raw.githubusercontent.com/caolan/async/master/dist/async.min.js">GitHub</a>&#x4E0B;&#x8F7D;&#x6E90;&#x7801;.
&#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;npm&#x5B89;&#x88C5;:</p>
<pre class="prettyprint source lang-bash"><code>$ npm i async
</code></pre>
<p>&#x7136;&#x540E; <code>require()</code>&#x5F15;&#x5165;&#x6574;&#x4E2A;&#x6A21;&#x5757;:</p>
<pre class="prettyprint source lang-js"><code>var async = require(&quot;async&quot;);
</code></pre>
<p>&#x6216;&#x7F3A;&#x90E8;&#x5206;&#x5F15;&#x5165;&#x67D0;&#x4E2A;&#x65B9;&#x6CD5;:</p>
<pre class="prettyprint source lang-js"><code>var waterfall = require(&quot;async/waterfall&quot;);
var map = require(&quot;async/map&quot;);
</code></pre>
<p><strong>&#x5F00;&#x53D1;&#x7248;:</strong> <a href="https://raw.githubusercontent.com/caolan/async/master/dist/async.js">async.js</a> - 29.6kb &#x672A;&#x538B;&#x7F29;</p>
<h3>&#x5728;&#x6D4F;&#x89C8;&#x5668; In the Browser</h3>
<p>Async &#x53EF;&#x4EE5;&#x8FD0;&#x884C;&#x5728;&#x4EFB;&#x4F55; ES2015 &#x73AF;&#x5883; (Node 6+ and all modern browsers).</p>
<p>&#x5982;&#x679C;&#x4F60;&#x60F3;&#x5728;&#x66F4;&#x8001;&#x7684;&#x73AF;&#x5883;&#x4E2D;&#x4F7F;&#x7528;Async, (e.g. Node 4, IE11) &#x4F60;&#x9700;&#x8981;&#x505A;&#x5982;&#x4E0B;&#x8F6C;&#x6362;.</p>
<p>Usage:</p>
<pre class="prettyprint source lang-html"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;async.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

    async.map(data, asyncProcess, function(err, results) {
        alert(results);
    });

&lt;/script&gt;
</code></pre>
<p>Async &#x7684;&#x53EF;&#x79FB;&#x690D;&#x7248;&#x672C;, &#x5305;&#x542B; <code>async.js</code> and <code>async.min.js</code>, &#x5728; <code>/dist</code> &#x6587;&#x4EF6;&#x5939;&#x4E0B;. Async &#x652F;&#x6301; <a href="http://www.jsdelivr.com/projects/async">jsDelivr CDN</a>.</p>
<h3>ES Modules &#x652F;&#x6301;</h3>
<p>Async&#x5305;&#x542B;&#x4E00;&#x4E2A; <code>.mjs</code>&#x7248;&#x672C;&#xFF0C;&#x8BE5;&#x7248;&#x672C;&#x5E94;&#x7531;&#x517C;&#x5BB9;&#x7684;&#x6253;&#x5305;&#x5DE5;&#x5177;&#x81EA;&#x52A8;&#x4F7F;&#x7528;&#xFF0C;&#x4F8B;&#x5982;Webpack&#x6216;Rollup&#x7B49;&#x4EFB;&#x4F55;&#x4F7F;&#x7528; <code>package.json</code>&#x7684;<code>module</code>&#x5B57;&#x6BB5;&#x7684;&#x4E1C;&#x897F;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x8FD8;&#x5728;npm&#x4E0A;&#x7684;&#x53E6;&#x4E00;&#x4E2A;<code>async-es</code>&#x5305;&#x4E2D;&#x63D0;&#x4F9B;Async&#x4F5C;&#x4E3A;&#x7EAF;ES2015&#x6A21;&#x5757;&#x7684;&#x96C6;&#x5408;&#x3002;</p>
<pre class="prettyprint source lang-bash"><code>$ npm install async-es
</code></pre>
<pre class="prettyprint source lang-js"><code>import waterfall from &apos;async-es/waterfall&apos;;
import async from &apos;async-es&apos;;
</code></pre>
<h3>Typescript &#x652F;&#x6301;</h3>
<p>Async &#x7684;&#x7B2C;&#x4E09;&#x65B9;&#x7C7B;&#x578B;&#x5B9A;&#x4E49;&#x3002;</p>
<pre class="prettyprint source"><code>npm i -D @types/async
</code></pre>
<p>&#x5EFA;&#x8BAE;&#x5728;&#x60A8;&#x7684;<code>tsconfig.json</code>&#x4E2D;&#x7F16;&#x8BD1;&#x9009;&#x9879;&#x4E2D;&#x914D;&#x7F6E;ES2017&#x6216;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#xFF0C;&#x8FD9;&#x6837;&#x4F1A;&#x4FDD;&#x7559;<code>async</code>&#x51FD;&#x6570;&#xFF1A;</p>
<pre class="prettyprint source lang-json"><code>{
  &quot;compilerOptions&quot;: {
    &quot;target&quot;: &quot;es2017&quot;
  }
}
</code></pre>
<h2>&#x5176;&#x4ED6;&#x4ED3;&#x5E93;(&#x53CB;&#x60C5;&#x94FE;&#x63A5;)</h2>
<ul>
<li><a href="https://www.npmjs.com/package/limiter"><code>limiter</code></a> a package for rate-limiting based on requests per sec/hour.</li>
<li><a href="https://www.npmjs.com/package/neo-async"><code>neo-async</code></a> an altername implementation of Async, focusing on speed.</li>
<li><a href="https://www.npmjs.com/package/co-async"><code>co-async</code></a> a library inspired by Async for use with <a href="https://www.npmjs.com/package/co"><code>co</code></a> and generator functions.</li>
<li><a href="https://www.npmjs.com/package/promise-async"><code>promise-async</code></a> a version of Async where all the methods are Promisified.</li>
</ul>
<hr>
<hr>
<p>---------&#x534E;&#x4E3D;&#x7684;&#x5206;&#x5272;&#x7EBF;, &#x540E;&#x9762;&#x7684;&#x8BD1;&#x8005;&#x7684;&#x7406;&#x89E3;------------------</p>
<hr>
<hr>
<h2>Async &#x4E3B;&#x8981;&#x5305;&#x542B;&#x4E09;&#x4E2A;&#x90E8;&#x5206;&#x7684;&#x51FD;&#x6570;</h2>
<h3>1. &#x5BF9;&#x96C6;&#x5408;&#x7684;&#x5F02;&#x6B65;&#x62D3;&#x5C55;,Array.prototype&#x4E0A;&#x65B9;&#x6CD5;&#x7684;&#x8865;&#x5145;,&#x539F;&#x751F;&#x662F;&#x4E0D;&#x652F;&#x6301;&#x5F02;&#x6B65;&#x7684;</h3>
<ul>
<li>concat</li>
<li>detect find</li>
<li>each forEach  --&#x4E0D;&#x5E26;index</li>
<li>eachOf forEachOf --&#x5E26;index</li>
<li>every</li>
<li>filter</li>
<li>groupBy</li>
<li>map</li>
<li>mapValues</li>
<li>reduce reduceRight transform --&#x90FD;&#x662F;&#x505A;&#x7D2F;&#x52A0;&#x7684;</li>
<li>reject --filter&#x7684;&#x8865;&#x96C6;</li>
<li>some</li>
<li>sortBy</li>
<li>&#x4EE5;&#x4E0A;&#x65B9;&#x6CD5;&#x53C8;&#x6709;Limit&#x53D8;&#x4F53;&#x7248;&#x672C;</li>
<li>Limit&#x662F;&#x9650;&#x5236;&#x5E76;&#x53D1;&#x6570;&#x91CF;&#x7684;</li>
<li>Series&#x53C8;&#x662F;Limit&#x5E76;&#x53D1;&#x6570;&#x4E3A;1&#x7684;&#x53D8;&#x4F53;&#x7248;&#x672C;</li>
</ul>
<h3>2. &#x5F02;&#x6B65;&#x5DE5;&#x4F5C;&#x6D41;</h3>
<ul>
<li>
<p>&#x5DE5;&#x4F5C;&#x6D41;</p>
<ul>
<li>queue &#x961F;&#x5217;,&#x6267;&#x884C;&#x5668;&#x53EA;&#x80FD;&#x62FF;&#x5230;&#x5F53;&#x524D;&#x6267;&#x884C;&#x7684;&#x4EFB;&#x52A1;</li>
<li>priorityQueue &#x8DDF;queue&#x76F8;&#x540C;,&#x4F46;&#x662F;&#x4EFB;&#x52A1;&#x5E26;&#x6267;&#x884C;&#x4F18;&#x5148;&#x7EA7;</li>
<li>cargo &#x961F;&#x5217;,&#x6267;&#x884C;&#x5668;&#x4E2D;&#x62FF;&#x5230;&#x961F;&#x5217;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x4EFB;&#x52A1;&#x4FE1;&#x606F;</li>
<li>waterfall &#x7011;&#x5E03;,&#x4ECE;&#x4E0A;&#x5F80;&#x4E0B;&#x6267;&#x884C;,&#x6700;&#x540E;&#x7684;&#x56DE;&#x8C03;&#x62FF;&#x5230;&#x7011;&#x5E03;&#x4E2D;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x51FD;&#x6570;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C;</li>
<li>series &#x4E00;&#x4E2A;&#x4E00;&#x4E2A;&#x8FD0;&#x884C;,&#x6700;&#x540E;&#x7684;&#x56DE;&#x8C03;&#x62FF;&#x5230;&#x6240;&#x6709;&#x51FD;&#x6570;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C;</li>
<li>auto &#x81EA;&#x52A8;&#x8FD0;&#x884C;,&#x6839;&#x636E;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x7684;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;&#x81EA;&#x52A8;&#x6267;&#x884C;</li>
<li>times &#x6267;&#x884C;&#x540C;&#x4E00;&#x4E2A;&#x51FD;&#x6570;&#x591A;&#x6B21;</li>
<li>retry &#x6267;&#x884C;&#x5931;&#x8D25;&#x4F1A;&#x91CD;&#x8BD5;,&#x76F4;&#x5230;&#x6210;&#x529F;(&#x9ED8;&#x8BA4;&#x91CD;&#x8BD5;5&#x6B21;,&#x91CD;&#x8BD5;&#x95F4;&#x9694;0&#x79D2;)</li>
<li>forever &#x4E00;&#x76F4;&#x6267;&#x884C;&#x8FD9;&#x4E2A;&#x51FD;&#x6570;,&#x9664;&#x975E;&#x62A5;&#x9519;</li>
</ul>
</li>
<li>
<p>Promise&#x5BF9;&#x5E94;&#x7684;Async&#x5B9E;&#x73B0;</p>
<ul>
<li>parallel &#x4E00;&#x8D77;&#x6267;&#x884C;,&#x4EFB;&#x4F55;&#x4E00;&#x4E2A;&#x62A5;&#x9519;&#x5C31;&#x9000;&#x51FA;,&#x7B49;&#x540C;&#x4E8E;Promise.all [&#x62FF;&#x5230;&#x5168;&#x90E8;&#x6B63;&#x786E;&#x7684;&#x7ED3;&#x679C;]</li>
<li>Promise.allSettled [&#x62FF;&#x5230;&#x5168;&#x90E8;&#x7ED3;&#x679C;,&#x4E0D;&#x8BBA;&#x5BF9;&#x9519;],&#x8FD9;&#x4E2A;Async&#x6CA1;&#x6709;&#x5BF9;&#x5E94;&#x7684;&#x5B9E;&#x73B0;,reflect&#x548C;reflectAll&#x53EF;&#x4EE5;&#x963B;&#x6B62;&#x9519;&#x8BEF;&#x7EC8;&#x7AEF;&#x5DE5;&#x4F5C;&#x6D41;</li>
</ul>
<pre class="prettyprint source lang-js"><code>async.allSettled=async.parallel(async.reflectAll(tasks))
</code></pre>
<ul>
<li>tryEach &#x4EFB;&#x4F55;&#x4E00;&#x4E2A;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x6210;&#x529F;&#x5C31;&#x4F1A;&#x9000;&#x51FA;&#x5DE5;&#x4F5C;&#x6D41;,&#x7B49;&#x540C;&#x4E8E;Promise.any [&#x62FF;&#x5230;&#x7B2C;&#x4E00;&#x4E2A;&#x6B63;&#x786E;&#x7684;&#x7ED3;&#x679C;]</li>
<li>race &#x4EFB;&#x4F55;&#x4E00;&#x4E2A;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x6210;&#x529F;&#x6216;&#x8005;&#x5931;&#x8D25;&#x5C31;&#x662F;&#x9000;&#x51FA;&#x5DE5;&#x4F5C;&#x6D41;,&#x7B49;&#x540C;&#x4E8E;Promise.race[&#x62FF;&#x5230;&#x7B2C;&#x4E00;&#x4E2A;&#x6267;&#x884C;&#x5B8C;&#x6210;&#x7684;&#x7ED3;&#x679C;,&#x4E0D;&#x8BBA;&#x5BF9;&#x9519;]</li>
</ul>
</li>
<li>
<p>&#x5FAA;&#x73AF;&#x5DE5;&#x4F5C;&#x6D41;</p>
<ul>
<li>whilst while(condition){statement}  &#x6761;&#x4EF6;&#x6EE1;&#x8DB3;&#x7EE7;&#x7EED;&#x5FAA;&#x73AF;</li>
<li>doWhilst do{statement}while(condition) &#x81F3;&#x5C11;&#x4F1A;&#x6267;&#x884C;&#x4E00;&#x6B21;</li>
<li></li>
<li>until  loop{}until(condition)  &#x6761;&#x4EF6;&#x6EE1;&#x8DB3;&#x9000;&#x51FA;&#x5FAA;&#x73AF;</li>
<li>doUntil do{}until(condition) &#x81F3;&#x5C11;&#x4F1A;&#x6267;&#x884C;&#x4E00;&#x6B21;</li>
</ul>
</li>
<li>
<p>&#x8F85;&#x52A9;&#x51FD;&#x6570;</p>
<ul>
<li>compose &#x6253;&#x6563;&#x7BA1;&#x9053;&#x65B9;&#x6CD5; &#x4F8B;&#x5982; <code>a(b(c()))</code> compose(a,b,c)</li>
<li>seq compose&#x7684;&#x53EF;&#x8BFB;&#x7248;&#x672C; seq(a,b,c) &#x5BF9;&#x5E94;&#x7684;&#x662F; <code>c(b(a()))</code></li>
<li>applyEach &#x591A;&#x4E2A;&#x5F02;&#x6B65;&#x65B9;&#x6CD5;&#x7684;&#x53C2;&#x6570;&#x76F8;&#x540C;,&#x5E76;&#x53D1;&#x7248;</li>
<li>applyEachSeries &#x591A;&#x4E2A;&#x5F02;&#x6B65;&#x65B9;&#x6CD5;&#x7684;&#x53C2;&#x6570;&#x76F8;&#x540C;,&#x6392;&#x961F;&#x7248;</li>
</ul>
</li>
</ul>
<h3>3. &#x8F85;&#x52A9;&#x51FD;&#x6570;</h3>
<ul>
<li>apply &#x591A;&#x53C2;&#x6570;&#x8F6C;&#x6362;&#x6210;&#x53EA;&#x6709;&#x4E00;&#x4E2A;callback&#x53C2;&#x6570;&#x7684;&#x51FD;&#x6570;</li>
<li>asyncify,wrapSync &#x5305;&#x88C5; ES2017 async function &#x6210; Node-style&#x98CE;&#x683C;AsyncFunction</li>
<li>constant &#x5305;&#x88C5;&#x5E38;&#x91CF;&#x6210; AsyncFunction</li>
<li>dir,log &#x65B9;&#x4FBF;&#x8C03;&#x8BD5;&#x8F93;&#x51FA;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C;</li>
<li>ensureAsync &#x786E;&#x4FDD;&#x51FD;&#x6570;&#x662F;&#x5F02;&#x6B65;&#x6267;&#x884C;,&#x9632;&#x6B62;&#x540C;&#x6B65;&#x8C03;&#x7528;&#x8FED;&#x4EE3;&#x6808;&#x6EA2;&#x51FA;</li>
<li>memoize unmemoize &#x6162;&#x51FD;&#x6570;&#x589E;&#x52A0;&#x7F13;&#x5B58;,&#x6E05;&#x9664;&#x7F13;&#x5B58;</li>
<li>nextTick &#x5C06;&#x51FD;&#x6570;&#x653E;&#x5165;&#x4E0B;&#x4E00;&#x6B21;&#x4E8B;&#x5047;&#x5FAA;&#x73AF;&#x6267;&#x884C;</li>
<li>reflect reflectAll &#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x51FD;&#x6570;,&#x53CA;&#x65F6;callback(error)&#x4E5F;&#x4E0D;&#x4F1A;&#x5BFC;&#x81F4;&#x5DE5;&#x4F5C;&#x6D41;&#x7ED3;&#x675F;</li>
<li>setImmediate &#x8DDF;nextTick&#x5DEE;&#x4E0D;&#x591A;</li>
<li>timeout &#x7ED9;&#x5F02;&#x6B65;&#x51FD;&#x6570;&#x589E;&#x52A0;&#x8D85;&#x65F6;</li>
</ul></article>
    </section>






    <footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> using the Minami theme.
</footer></div>
</div>

<nav id="toc">
    <h3>Methods:</h3><ul class="nav methods"><li class="toc-header"><a href="docs.html#collections">Collections</a></li><li data-type="method" class="toc-method"><a href="docs.html#concat">concat</a></li><li data-type="method" class="toc-method"><a href="docs.html#concatLimit">concatLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#concatSeries">concatSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#detect">detect</a></li><li data-type="method" class="toc-method"><a href="docs.html#detectLimit">detectLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#detectSeries">detectSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#each">each</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachLimit">eachLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOf">eachOf</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOfLimit">eachOfLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOfSeries">eachOfSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachSeries">eachSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#every">every</a></li><li data-type="method" class="toc-method"><a href="docs.html#everyLimit">everyLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#everySeries">everySeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#filter">filter</a></li><li data-type="method" class="toc-method"><a href="docs.html#filterLimit">filterLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#filterSeries">filterSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#groupBy">groupBy</a></li><li data-type="method" class="toc-method"><a href="docs.html#groupByLimit">groupByLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#groupBySeries">groupBySeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#map">map</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapLimit">mapLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapSeries">mapSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValues">mapValues</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValuesLimit">mapValuesLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValuesSeries">mapValuesSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#reduce">reduce</a></li><li data-type="method" class="toc-method"><a href="docs.html#reduceRight">reduceRight</a></li><li data-type="method" class="toc-method"><a href="docs.html#reject">reject</a></li><li data-type="method" class="toc-method"><a href="docs.html#rejectLimit">rejectLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#rejectSeries">rejectSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#some">some</a></li><li data-type="method" class="toc-method"><a href="docs.html#someLimit">someLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#someSeries">someSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#sortBy">sortBy</a></li><li data-type="method" class="toc-method"><a href="docs.html#transform">transform</a></li><li class="toc-header"><a href="docs.html#controlflow">Control Flow</a></li><li data-type="method" class="toc-method"><a href="docs.html#applyEach">applyEach</a></li><li data-type="method" class="toc-method"><a href="docs.html#applyEachSeries">applyEachSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#auto">auto</a></li><li data-type="method" class="toc-method"><a href="docs.html#autoInject">autoInject</a></li><li data-type="method" class="toc-method"><a href="docs.html#cargo">cargo</a></li><li data-type="method" class="toc-method"><a href="docs.html#cargoQueue">cargoQueue</a></li><li data-type="method" class="toc-method"><a href="docs.html#compose">compose</a></li><li data-type="method" class="toc-method"><a href="docs.html#doUntil">doUntil</a></li><li data-type="method" class="toc-method"><a href="docs.html#doWhilst">doWhilst</a></li><li data-type="method" class="toc-method"><a href="docs.html#forever">forever</a></li><li data-type="method" class="toc-method"><a href="docs.html#parallel">parallel</a></li><li data-type="method" class="toc-method"><a href="docs.html#parallelLimit">parallelLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#priorityQueue">priorityQueue</a></li><li data-type="method" class="toc-method"><a href="docs.html#queue">queue</a></li><li data-type="method" class="toc-method"><a href="docs.html#race">race</a></li><li data-type="method" class="toc-method"><a href="docs.html#retry">retry</a></li><li data-type="method" class="toc-method"><a href="docs.html#retryable">retryable</a></li><li data-type="method" class="toc-method"><a href="docs.html#seq">seq</a></li><li data-type="method" class="toc-method"><a href="docs.html#series">series</a></li><li data-type="method" class="toc-method"><a href="docs.html#times">times</a></li><li data-type="method" class="toc-method"><a href="docs.html#timesLimit">timesLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#timesSeries">timesSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#tryEach">tryEach</a></li><li data-type="method" class="toc-method"><a href="docs.html#until">until</a></li><li data-type="method" class="toc-method"><a href="docs.html#waterfall">waterfall</a></li><li data-type="method" class="toc-method"><a href="docs.html#whilst">whilst</a></li><li class="toc-header"><a href="docs.html#utils">Utils</a></li><li data-type="method" class="toc-method"><a href="docs.html#apply">apply</a></li><li data-type="method" class="toc-method"><a href="docs.html#asyncify">asyncify</a></li><li data-type="method" class="toc-method"><a href="docs.html#constant">constant</a></li><li data-type="method" class="toc-method"><a href="docs.html#dir">dir</a></li><li data-type="method" class="toc-method"><a href="docs.html#ensureAsync">ensureAsync</a></li><li data-type="method" class="toc-method"><a href="docs.html#log">log</a></li><li data-type="method" class="toc-method"><a href="docs.html#memoize">memoize</a></li><li data-type="method" class="toc-method"><a href="docs.html#nextTick">nextTick</a></li><li data-type="method" class="toc-method"><a href="docs.html#reflect">reflect</a></li><li data-type="method" class="toc-method"><a href="docs.html#reflectAll">reflectAll</a></li><li data-type="method" class="toc-method"><a href="docs.html#setImmediate">setImmediate</a></li><li data-type="method" class="toc-method"><a href="docs.html#timeout">timeout</a></li><li data-type="method" class="toc-method"><a href="docs.html#unmemoize">unmemoize</a></li></ul><h3>Methods:</h3>
</nav>

<br class="clear">




<script src="https://cdn.jsdelivr.net/prettify/0.1/prettify.js"></script>

<script src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/typeahead.js/0.11.1/typeahead.bundle.min.js"></script>
<script>prettyPrint();</script>
<script src="scripts/async.js"></script>

<script src="scripts/linenumber.js" async></script>
<script src="scripts/jsdoc-custom.js" async></script>
</body>